gesture: Only recognize gestures with as many interacting touches as those handled
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 21 Mar 2014 17:13:41 +0000 (18:13 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 23 May 2014 17:54:23 +0000 (19:54 +0200)
If a gesture has denied sequences (so those are presumably handled above/below
the widget), it shouldn't attempt to handle extra touches, even if those end
up matching the expected number of touches.

gtk/gtkgesture.c

index c24fc596063de6a307264e66045d344cde5c15cd..e4f9306f0264a40a3317792b8e1f7cd64ebcbb26 100644 (file)
@@ -200,6 +200,7 @@ _gtk_gesture_check_recognized (GtkGesture       *gesture,
     _gtk_gesture_set_recognized (gesture, FALSE, sequence);
   else if (!priv->recognized &&
            current_n_points == priv->n_points &&
+           g_hash_table_size (priv->points) == priv->n_points &&
            _gtk_gesture_do_check (gesture))
     _gtk_gesture_set_recognized (gesture, TRUE, sequence);